<template>
	<view>
		<view class="container" v-for="(v,i) in list" :key="v.id">
			<view class="title">
				{{v.modelName}}
			</view>
			<view class="content">
				<view class="content_mon">
					￥{{v.totalPrice}}
				</view>
				<view class="content_time">
				{{v.updateTime}}
				</view>
			</view>
		</view>


	</view>
</template>

<script>
		import {orderexchangeList} from "@/api/order"
	export default {
		data() {
			return {
				info:{
					page:1,
					limit:10,
					pages:1
				},
				list:[],
			}
		},
		onShow() {
			this.getData()
		},
		 onReachBottom() {

		      this.info.page=this.info.page+1
	
				this.getData()
		    },

		methods: {
			getData(){
				orderexchangeList(this.info).then(res=>{
					console.log(res);
					this.info.page=res.data.current
					this.info.limit=res.data.size
					this.info.pages=res.data.pages
					this.list=[...this.list,...res.data.records]
				})

			}
		}
	}
</script>

<style scoped lang="less">
	.container{
		margin: 20upx 30upx;
		display: flex;
		justify-content: space-between;
		border-bottom: 1px solid #AAAAAA;
		width: 690upx;

	}
	.title{
		width: 300upx;
		margin-top: 30upx;
		height: 100%;
	}
	.content_mon{
		color: red;
		margin-left: 200upx;
	}
	.content_time{ 
		margin-top: 30upx;
		color: #B2B2B2;
	}
</style>
